package com.bw.merchant.entity

import com.chad.library.adapter.base.entity.MultiItemEntity

data class MerchantEntity(
    var applicationArea: Double = 0.0,
    var applicationNumber: String = "",
    var contactMethod: String = "",
    var contactName: String = "",
    var documents: List<String> = listOf(),
    var enterpriseName: String = "",
    var enterpriseProfileId: Int = 0,
    var entryPersonnel: Int = 0,
    var entryTime: String = "",
    var id: Int = 0,
    var processingSteps: List<ProcessingStep> = listOf(),
    var status: String = ""
):java.io.Serializable, MultiItemEntity{
    override val itemType: Int
        get() = getState(status)
}

data class ProcessingStep(
    val business: String,
    val id: Int,
    val stepTime: String
):java.io.Serializable

fun getState(state:String):Int{
    var index = 0
    when(state){
        "新建" -> index = 0
        "已审核" -> index = 1
    }
    return index
}